package leetcode.code1668;

import leetcode.IDebug;
import leetcode.helper.H;

// KMP MARK 这个必须要补一个kmp
public class Solution2 implements IDebug {
	
	public int maxRepeating(String sequence, String word) {
		int ans = 0;
//		for (int i = 0, p = 0, cnt = 0; i < sequence.length(); i++) {
//			if (sequence.charAt(i) == word.charAt(p)) {
//				if (++p == word.length()) {
//					p = 0;
//					ans = Math.max(ans, ++cnt);
//				}
//			} else {
//				p = 0;
//				cnt = 0;
//			}
//		}
		return ans;
	}

	@Override
	public void debug4() {
		H.compare(5, this.maxRepeating("aaabaaaabaaabaaaabaaaabaaaabaaaaba", "aaaba"));

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug1() {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		Solution2 so = new Solution2();
		so.debug1();
		so.debug2();
		so.debug3();
		so.debug4();

	}

}

